import { axios } from '@/utils/request'

const api = {
  list: '/goods/tag/list',
  add: '/goods/tag/add',
  deleted: '/goods/tag/del',
  all: '/goods/tag/all'
}

/**
 * 获取列表
 */
export function list (params) {
  return axios({
    url: api.list,
    method: 'get',
    params
  })
}

export function all () {
  return axios({
    url: api.all,
    method: 'get'
  })
}

export function deleted (params) {
  return axios({
    url: api.deleted,
    method: 'get',
    params
  })
}

// 添加
export function add (data) {
  return axios({
    url: api.add,
    method: 'post',
    data
  })
}
